<!DOCTYPE html>
<html>
  
    <head>
    <meta charset="UTF-8">
    <title>-</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width,user-scalable=yes, minimum-scale=0.4, initial-scale=0.8,target-densitydpi=low-dpi" />
    <link rel="shortcut icon" href="/favicon.ico" type="image/x-icon" />
    <link rel="stylesheet" href="./css/font.css">
  <link rel="stylesheet" href="./css/tadmin.css">
  <script type="text/javascript" src="./lib/jquery/jquery.min.js"></script>
  <script src="./lib/layui/layui.js" charset="utf-8"></script>
   <script type="text/javascript" src="./js/tadmin.js"></script>  
  </head>
  
  <body>
   
    <div class="tngou-body">
    
    <div class="layui-row">
     
        <form class="layui-form layui-col-md12 tngou-so">
          <input class="layui-input" placeholder="开始日" name="start" id="start">
          <input class="layui-input" placeholder="截止日" name="end" id="end">
          <input type="text" name="username"  placeholder="请输入用户名" autocomplete="off" class="layui-input">
          <button class="layui-btn"  lay-submit="" lay-filter="sreach"><i class="layui-icon">&#xe615;</i></button>
         <button  class="layui-btn layui-btn-danger tngou-right" onclick="x_admin_show('添加用户','./role-add.html')"><i class="layui-icon"></i>添加</button>
      
        </form>
        
      </div>
    
       <table class="layui-hide" id="role-table"></table>              
		<script>
		layui.use('table', function(){
		  var table = layui.table;
		  
		  table.render({
		    elem: '#role-table'
		    ,height: 'full-100'
		    ,url:'json/log.json'   
		    ,cols: [[
		    	      {type:'numbers'}
		    	      ,{type: 'checkbox'}
		    	      ,{field:'id', title:'ID', width:100, unresize: true, sort: true}
		    	      ,{field:'time', title:'时间'}
		    	      ,{field:'user', title:'用户'}
		    	      ,{field:'des', title:'操作'}
		    	     ,{field:'mange', width:150, templet: '#barMange', unresize: true}
		    	     
						
		    ]]
		    ,page: true
		    
		  });
		  //监听性别操作
		  form.on('switch(sexDemo)', function(obj){
		    layer.tips(this.value + ' ' + this.name + '：'+ obj.elem.checked, obj.othis);
		  });
		  
		  //监听锁定操作
		  form.on('checkbox(lockDemo)', function(obj){
		    layer.tips(this.value + ' ' + this.name + '：'+ obj.elem.checked, obj.othis);
		  });
		});
		</script>
		 
		<script type="text/html" id="switchTpl">
  <!-- 这里的 checked 的状态只是演示 -->
  <input type="checkbox" name="sex" value="{{d.id}}" lay-skin="switch" lay-text="女|男" lay-filter="sexDemo" {{ d.id == 10003 ? 'checked' : '' }}>
	</script>
		 
		<script type="text/html" id="checkboxTpl">
  <!-- 这里的 checked 的状态只是演示 -->
  <input type="checkbox" name="lock" value="{{d.id}}" title="锁定" lay-filter="lockDemo" {{ d.id == 10006 ? 'checked' : '' }}>
	</script>
		
		 <script type="text/html" id="barMange">
  		<a class="layui-btn layui-btn-primary layui-btn-xs" lay-event="detail">查看</a>
  		<a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del">删除</a>
	</script>
    </div>
    <script>
    layui.use('laydate', function(){
        var laydate = layui.laydate;
        
        //执行一个laydate实例
        laydate.render({
          elem: '#start' //指定元素
        });

        //执行一个laydate实例
        laydate.render({
          elem: '#end' //指定元素
        });
      });
    </script>

  </body>

</html>